package com.gaohe.controller;

import com.gaohe.common.Result;
import com.gaohe.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/course")
public class CourseController {
    @Autowired
    private CourseService courseService;
    @GetMapping("/getCourseListByMemberId")
    public Result listCourseByMemberId(
            @RequestParam("memberId")Long memberId,
            @RequestParam("type")String type,
            @RequestParam("page")Integer page,
            @RequestParam("pageSize")Integer pageSize
    ){
        return courseService.listCourseByMemberId(memberId,type,page,pageSize);
    }
}
